\subsection{View}
In this project we have used a transport approach of the view. The view generates the HTML with data from the controller. An example of a controller can be seen on \cref{lst:continentview}. On line 1 a new country controller is created. This controller is then called with the method $getAllCountriesOnContinent$ which takes a continent id as parameter. This method returns an array of country objects. This array is iterated and every country is printed, which can be seen on line 5-14.

\begin{code}{lst:continentview}{The continent view}
\begin{lstlisting}
    $country_controller = new CountryController($link);

    foreach($country_controller->getAllCountriesOnContinent($continent_id) as $country)
    {
        echo "<div class='panel panel-default'>";
        echo "<div class='panel-heading'>";
        echo "<h3 class='panel-title'><a href='index.php?action=getCities&id=$country->id'>$country->name</a></h3>";
        echo "</div>";
        echo "<div class='panel-body'>";
        echo "Population: $country->population <br />";
        echo "Car code: $country->car_code <br />";
        echo "Capital: $country->capital";
        echo "</div>";
        echo "</div>";
    }
\end{lstlisting}
\end{code}